<template>
  <view class="page">
    <custom-navbar title="首页" :showBack="true" titleColor="#333333">
    </custom-navbar>

    <view class="u-demo-block">
      <text class="u-demo-block__title">卡片式</text>
      <up-swiper
        :list="swiperList"
        previousMargin="30"
        nextMargin="30"
        circular
        :autoplay="false"
        radius="5"
        bgColor="#ffffff"
      ></up-swiper>
    </view>

    <view class="footer-box">
      <up-tabbar
        :value="value1"
        @change="change1"
        :fixed="false"
        :placeholder="false"
        :safeAreaInsetBottom="false"
      >
        <up-tabbar-item
          text="首页"
          icon="home"
          @click="click1"
        ></up-tabbar-item>
        <up-tabbar-item
          text="放映厅"
          icon="photo"
          @click="click1"
        ></up-tabbar-item>
        <up-tabbar-item
          text="直播"
          icon="play-right"
          @click="click1"
        ></up-tabbar-item>
        <up-tabbar-item
          text="我的"
          icon="account"
          @click="click1"
        ></up-tabbar-item>
      </up-tabbar>
    </view>
  </view>
</template>

<script setup lang="ts">
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { storeToRefs } from "pinia";
import { getTest, postTest, userInfoApi } from "@/common/request/api/index.js";
import { useUserStore } from "@/stores/user";
const show = ref();

// swiper
const swiperList = ref([
  "https://cdn.uviewui.com/uview/swiper/swiper3.png",
  "https://cdn.uviewui.com/uview/swiper/swiper2.png",
  "https://cdn.uviewui.com/uview/swiper/swiper1.png",
]);

const value1 = ref(0);
function click1(e) {
  console.log(e);
}

onLoad(() => {
  getTestData();
  postTestData();
});
</script>

<style lang="scss" scoped>
.page {
  padding-top: calc(var(--status-bar-height) + 44px);
}
.footer-box {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}
</style>
